package com.jast.business.service.impl;

import java.util.List;
import com.jast.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jast.business.mapper.BigdataHbaseKvMapper;
import com.jast.business.domain.BigdataHbaseKv;
import com.jast.business.service.IBigdataHbaseKvService;
import com.jast.common.core.text.Convert;

/**
 * Hbase监控指标最新值Service业务层处理
 * 
 * @author Jast
 * @date 2023-02-02
 */
@Service
public class BigdataHbaseKvServiceImpl implements IBigdataHbaseKvService 
{
    @Autowired
    private BigdataHbaseKvMapper bigdataHbaseKvMapper;

    /**
     * 查询Hbase监控指标最新值
     * 
     * @param id Hbase监控指标最新值主键
     * @return Hbase监控指标最新值
     */
    @Override
    public BigdataHbaseKv selectBigdataHbaseKvById(Long id)
    {
        return bigdataHbaseKvMapper.selectBigdataHbaseKvById(id);
    }

    /**
     * 查询Hbase监控指标最新值列表
     * 
     * @param bigdataHbaseKv Hbase监控指标最新值
     * @return Hbase监控指标最新值
     */
    @Override
    public List<BigdataHbaseKv> selectBigdataHbaseKvList(BigdataHbaseKv bigdataHbaseKv)
    {
        return bigdataHbaseKvMapper.selectBigdataHbaseKvList(bigdataHbaseKv);
    }

    /**
     * 新增Hbase监控指标最新值
     * 
     * @param bigdataHbaseKv Hbase监控指标最新值
     * @return 结果
     */
    @Override
    public int insertBigdataHbaseKv(BigdataHbaseKv bigdataHbaseKv)
    {
        bigdataHbaseKv.setCreateTime(DateUtils.getNowDate());
        return bigdataHbaseKvMapper.insertBigdataHbaseKv(bigdataHbaseKv);
    }

    /**
     * 更新/新增Hbase监控指标最新值
     *
     * @param bigdataHbaseKv Hbase监控指标最新值
     * @return 结果
     */
    @Override
    public int upsertBigdataHbaseKv(BigdataHbaseKv bigdataHbaseKv)
    {
                bigdataHbaseKv.setUpdateTime(DateUtils.getNowDate());
            return bigdataHbaseKvMapper.upsertBigdataHbaseKv(bigdataHbaseKv);
    }

    /**
     * 修改Hbase监控指标最新值
     * 
     * @param bigdataHbaseKv Hbase监控指标最新值
     * @return 结果
     */
    @Override
    public int updateBigdataHbaseKv(BigdataHbaseKv bigdataHbaseKv)
    {
        bigdataHbaseKv.setUpdateTime(DateUtils.getNowDate());
        return bigdataHbaseKvMapper.updateBigdataHbaseKv(bigdataHbaseKv);
    }

    /**
     * 批量删除Hbase监控指标最新值
     * 
     * @param ids 需要删除的Hbase监控指标最新值主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHbaseKvByIds(String ids)
    {
        return bigdataHbaseKvMapper.deleteBigdataHbaseKvByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除Hbase监控指标最新值信息
     * 
     * @param id Hbase监控指标最新值主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHbaseKvById(Long id)
    {
        return bigdataHbaseKvMapper.deleteBigdataHbaseKvById(id);
    }
}
